import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: resolve => require(['@/components/login'], resolve)
    },{
      path: '/index',
      name: 'index',
      component: resolve => require(['@/components/content/index'], resolve),
      children:[{
        path:'/',
        name:'follow',
        component: resolve => require(['@/components/content/follow/index'], resolve),
      },{
        path:'ppm',
        name:'ppm',
        component: resolve => require(['@/components/content/follow/ppm'], resolve),
      },{
        path:'purchase',
        name:'purchase',
        component: resolve => require(['@/components/content/purchase/purchase'], resolve),
      },,{
        path:'quert',
        name:'quert',
        component: resolve => require(['@/components/content/purchase/quert'], resolve),
      },{
        path:'allQuestion',
        name:'allQuestion',
        component: resolve => require(['@/components/content/allQuestion/allQuestionIndex'], resolve)
      },{
        path:'questionContent',
        name:'questionContent',
        component: resolve => require(['@/components/content/allQuestion/questionContent'], resolve)
      },{
        path:'important',
        name:'important',
        component: resolve => require(['@/components/content/important/importantIndex'], resolve),
      },{
        path:'public_eightD',
        name:'public_eightD',
        component: resolve => require(['@/components/content/important/eightD/publicEigthD'], resolve),
        children: [{
          path:'/',
          name:'D_zero',
          component: resolve => require(['@/components/content/important/eightD/D_index'], resolve),
        },{
          path:'D_zero',
          name:'D_zero',
          component: resolve => require(['@/components/content/important/eightD/D_zero'], resolve),
        },{
          path:'D_one',
          name:'D_one',
          component: resolve => require(['@/components/content/important/eightD/D_one'], resolve),
        },{
          path:'D_two',
          name:'D_two',
          component: resolve => require(['@/components/content/important/eightD/D_two'], resolve),
        },{
          path:'D_three',
          name:'D_three',
          component: resolve => require(['@/components/content/important/eightD/D_three'], resolve),
        },{
          path:'D_four',
          name:'D_four',
          component: resolve => require(['@/components/content/important/eightD/D_four'], resolve),
        },{
          path:'D_five',
          name:'D_five',
          component: resolve => require(['@/components/content/important/eightD/D_five'], resolve),
        },{
          path:'D_six',
          name:'D_six',
          component: resolve => require(['@/components/content/important/eightD/D_six'], resolve),
        },{
          path:'D_seven',
          name:'D_seven',
          component: resolve => require(['@/components/content/important/eightD/D_seven'], resolve),
        },{
          path:'D_eight',
          name:'D_eight',
          component: resolve => require(['@/components/content/important/eightD/D_eight'], resolve),
        }]
      },{
        path:'scheduling',
        name:'scheduling',
        component: resolve => require(['@/components/content/scheduling/scheduling'], resolve)
      },{
        path:'automatic',
        name:'automatic',
        component: resolve => require(['@/components/content/scheduling/automatic'], resolve)
      },{
        path:'setParam',
        name:'setParam',
        component: resolve => require(['@/components/content/scheduling/setParam'], resolve),
        children: [{
          path:'/',
          name:'capacity',
          component: resolve => require(['@/components/content/scheduling/upstates/capacity'], resolve)
        },{
          path:'stock',
          name:'stock',
          component: resolve => require(['@/components/content/scheduling/upstates/stock'], resolve)
        },{
          path:'vacation',
          name:'vacation',
          component: resolve => require(['@/components/content/scheduling/upstates/vacation'], resolve)
        },{
          path:'maintain',
          name:'maintain',
          component: resolve => require(['@/components/content/scheduling/upstates/maintain'], resolve)
        }]
      }]
    }
  ]
})
